<template>
  <view class="calendar_containter">
    <view class="mingzhu">
      <view class="title">易朴周易大学堂四柱八字排盘</view>
      <view class="mingzhu-item">
        <view>八字排盘结果：</view>
      </view>
      <view class="mingzhu-item">
        <view>姓名：</view>
        <view class="mingzhu-item-content">{{ baziResult.userName }}</view>
        <view>五行：</view>
        <view class="mingzhu-item-content">
          <span v-for="(item, index) in baziResult.userNameInfo">
            {{ item.jtz }}({{ item.wx }}),
          </span>
        </view>
      </view>
      <view class="mingzhu-item">
        <view>性别：</view>
        <view class="mingzhu-item-content">{{ baziResult.sex }}</view>
        <view>胎元：</view>
        <view class="mingzhu-item-content"
          >{{ baziResult.taiYuan }}({{ baziResult.taiYuanNaYin }})</view
        >
        <view>命宫：</view>
        <view class="mingzhu-item-content"
          >{{ baziResult.mingGong }}({{ baziResult.monthNaYin }})</view
        >
      </view>
      <view class="mingzhu-item">
        <view>节气：</view>
        <view class="mingzhu-item-content">
          {{ baziResult.prevJieQi }}
          {{ baziResult.nextJieQi }}
        </view>
      </view>
      <view class="mingzhu-item">
        <view>起运：</view>
        <view class="mingzhu-item-content">命主于出生后起运</view>
        <view>排盘方式：</view>
        <view class="mingzhu-item-content">公历排盘</view>
      </view>
      <view class="mingzhu-item">
        <view>交运：</view>
        <view class="mingzhu-item-content">命主于{{ baziResult.startSolarYun }}交运</view>
      </view>
      <view class="mingzhu-item">
        <view>公历：</view>
        <view class="mingzhu-item-content coffee">{{ baziResult.birthDay }}</view>
      </view>
      <view class="mingzhu-item">
        <view>农历：</view>
        <view class="mingzhu-item-content coffee"
          >{{ baziResult.lunarDate }}(生肖{{ baziResult.chineseZodiac }})</view
        >
      </view>
      <view class="mingzhu-item" v-if="baziResult.trueSolarTime">
        <view>真太阳时：</view>
        <view class="mingzhu-item-content coffee">{{ baziResult.trueSolarTime }}</view>
      </view>
    </view>
  </view>
</template>
<script>
export default {
  props: {
    result: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {
      baziResult: this.result,
    };
  },
  methods: {
    adTarget(item) {
      window.location.href = item.skipLinks;
    },
  },
};
</script>

<style lang="scss" scoped>
.calendar_containter {
  width: 100%;
  box-sizing: border-box;
}
.mingzhu {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-size: 24rpx;
  line-height: 40rpx;
  padding: 20rpx;
  font-weight: bold;
  .title {
    width: 100%;
    text-align: center;
    color: #cc0000;
    font-size: 36rpx;
    padding-bottom: 40rpx;
  }
  .mingzhu-item {
    display: flex;
    flex-direction: row;
    white-space: nowrap;
    .mingzhu-item-content {
      padding: 0 20rpx 0 10rpx;
    }
  }
}
.coffee {
  color: rgb(153, 51, 0);
}
</style>
